<template>
  <div class="test3">
    <h1>这是一个用来测试的test3组件</h1>
    <h1>{{msg}}</h1>
    <button @click="onClick">按钮(传递数据给兄弟组件)</button>
  </div>
</template>
<script>
import Bus from '@/components/Bus'
export default {
  name: 'test3',
  data() {
    return {
      msg: 123
    }
  },
  methods: {
    onClick() {
      this.msg++
      Bus.$emit('add', this.msg)
    }
  }
}
</script>
<style scoped>
.test3 {
  color: #333;
}
</style>
